unit HashProgressWin;
{
    Copyright 2008, travieorama@googlemail.com

    This file is part of the taviesadora project

    taviesadora is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    taviesadora is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.


}
interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls;

type
  TfrmHashProgress = class(TForm)
    ProgressBar1: TProgressBar;
    Label1: TLabel;
    constructor create(FileName:string;Owner:TComponent);
    procedure SetProgress(prog,max:integer);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  frmHashProgress: TfrmHashProgress;

implementation

{$R *.dfm}

{ TfrmHashProgress }

constructor TfrmHashProgress.create(FileName: string; Owner: TComponent);
begin
  inherited create(Owner);
  Label1.Caption := ExtractFileName(FileName);
  show;
end;

procedure TfrmHashProgress.SetProgress(prog, max: integer);
begin
  ProgressBar1.Max := max;
  ProgressBar1.Position := prog;
  Application.ProcessMessages;
end;

procedure TfrmHashProgress.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  Action := caFree;
end;

end.
